#pragma once

class GDALDataset;

int progressCallback(double dfComplete, const char *pszMessage, void *pProgressArg);

class GdalLoader {
public:
	GdalLoader();
	virtual ~GdalLoader();
	static void registerGeotiffDriver();
	GDALDataset* openFile(const char* path);
	static void close(GDALDataset* data);
	void pixelToGeo(double pixelx, double pixely, double* geox, double* geoy);
	void geoToPixel(double geox, double geoy, double* pixelx, double* pixely);
	int getWidth();
	int getHeight();

protected:
	double padfTransform[6];
	int width;
	int height;
	GDALDataset* data;
};
